using Coding4Fun.Maelstrom.Common;
using Coding4Fun.Maelstrom.Hardware.Modules;

namespace Coding4Fun.Maelstrom.Hardware.Controllers
{
	public class GameStateAnimationController : IController
	{
		public bool ExecuteAction(UrlData data)
		{
			switch (data.GameStateAnimation)
			{
				case GameStateAnimation.GameResultsWon:
					RgbStripLighting.PlayGameResultsWin();
					break;
				case GameStateAnimation.GameResultsLost:
					RgbStripLighting.PlayGameResultsLost();
					break;
				case GameStateAnimation.Idle:
					RgbStripLighting.PlayGameIdle();
					break;
				case GameStateAnimation.GameStarted:
					RgbStripLighting.StopAnimation();
					break;
			}

			return true;
		}
	}
}
